﻿@section styles{
    <link href="~/lib/AdminLTE/plugins/iCheck/all.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/AdminLTE/plugins/select2/select2.min.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/bootstrapvalidator/dist/css/bootstrapValidator.min.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/css/base.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/bootstrap-fileinput/css/fileinput.min.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/wangEditor/dist/css/wangEditor.css" rel="stylesheet" asp-append-version="true" />
}
@section scripts{
    <script src="~/lib/AdminLTE/plugins/select2/select2.full.min.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrapvalidator/dist/js/bootstrapValidator.min.js" asp-append-version="true"></script>
    <script src="~/lib/AdminLTE/plugins/iCheck/icheck.min.js" asp-append-version="true"></script>
    <script src="~/js/base-message.js" asp-append-version="true"></script>
    <script src="~/js/base.js" asp-append-version="true"></script>
    <!--用于附件上传回填使用-->
    <script src="~/lib/bootstrap-fileinput/js/fileinput.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrap-fileinput/js/locales/zh.js" asp-append-version="true"></script>
    <script type="text/javascript" src="~/js/base-file.js" asp-append-version="true"></script>
    <script src="~/lib/wangEditor/dist/js/wangEditor.min.js" asp-append-version="true"></script>
    <script src="~/view-resources/Views/Message/Add.js" asp-append-version="true"></script>
}

<div class="content-wrapper" id="mainDiv" style="min-height: 935px;">
    <section class="content-header">
        <h1>
            消息管理
            <small>新建消息</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href=""><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">系统工具</a></li>
            <li class="active">消息管理</li>
        </ol>
    </section>

    <section class="content">
        <div class="row">
            <div class="col-md-3">
                <button data-btn-type="backInbox" data-flag="new" class="btn btn-primary btn-block margin-bottom">返回收件箱</button>
                @await Component.InvokeAsync("Message")
                
            </div>
            <div class="col-md-9">
                <div class="box box-primary" id="contentBody">
                    <form id="message_form" asp-action="Add" name="message_form" class="form-horizontal bv-form" enctype="multipart/form-data" novalidate="novalidate">
                        <!--<div class="box-header with-border">
                            <h3 class="box-title">新建消息</h3>
                        </div>-->
                        <div class="box-body">
                            <div class="col-md-12">
                                <input type="hidden" name="receiverType" id="receiverType">
                                <input type="hidden" id="sender" value="@User.Identity.Name" />
                                <div class="form-group">
                                    <div class="input-group">
                                        <input readonly="" id="receiverUsers" placeholder="接收人" class="form-control">
                                        <input type="hidden" name="receiverIds" id="receiverIds">
                                        <div class="input-group-addon">
                                            <a href="#" data-btn-type="selectReceiver"><i class="fa fa-users"></i>&nbsp;&nbsp;选择接收人</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" id="sendSubject" name="sendSubject" placeholder="标题，请控制在100字以内" />
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-6">
                                        <label class="control-label"> 
                                            <div class="icheckbox_square-green" aria-checked="false" style="position: relative;">
                                                <input type="checkbox" name="messageType" data-flag="icheck" class="square-green" value="0" checked style="position: absolute; opacity: 0;" />
                                            </div>&nbsp;&nbsp;系统消息
                                        </label>
                                        &nbsp;
                                        <label class="control-label"> 
                                            <div class="icheckbox_square-green" aria-checked="false" style="position: relative;">
                                                <input type="checkbox" name="messageType" data-flag="icheck" class="square-green" value="1" style="position: absolute; opacity: 0;">
                                            </div> &nbsp;&nbsp;邮件 
                                            </label>&nbsp;
                                        <label class="control-label">
                                            <div class="icheckbox_square-green" style="position: relative;">
                                                <input type="checkbox" name="messageType" data-flag="icheck" class="square-green" value="2" style="position: absolute; opacity: 0;" />
                                            </div> &nbsp;&nbsp;短信
                                        </label>
                                    </div>
                                    <div class="col-sm-6">
                                        <label class="control-label"> 
                                            <div class="iradio_square-grey" aria-checked="false" aria-disabled="false" style="position: relative;">
                                                <input type="radio" name="messageFlag" data-flag="icheck" class="square-grey" value="0" checked style="position: absolute; opacity: 0;" />
                                            </div> &nbsp;&nbsp;一般消息
                                        </label>&nbsp;
                                        <label class="control-label"> 
                                            <div class="iradio_square-yellow" aria-checked="false" aria-disabled="false" style="position: relative;">
                                                <input type="radio" name="messageFlag" data-flag="icheck" class="square-yellow" value="1" style="position: absolute; opacity: 0;" />
                                            </div> &nbsp;&nbsp;重要消息
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <!--WangEditor-->
                                    <div id="editor" style="height:400px;">
                                        <p>请输入消息内容...</p>
                                    </div>
                                </div>
                                <div class="form-group" id="file_container">
                                    <input id="attachment" type="file" multiple class="file-loading">
                                </div>
                            </div>
                        </div>
                        <div class="box-footer">
                            <div class="pull-right">
                                <button type="button" class="btn btn-default" data-btn-type="saveDraft">
                                    <i class="fa fa-pencil"></i> 保存为草稿
                                </button>
                                <button type="submit" class="btn btn-primary" data-btn-type="send">
                                    <i class="fa fa-envelope-o"></i> 发送
                                </button>
                            </div>
                            <button type="reset" class="btn btn-default" data-btn-type="cancel">
                                <i class="fa fa-times"></i> 取消
                            </button>
                        </div>
                        <input type="hidden" value=""><input type="hidden" value="">
                    </form>
                </div>
            </div>
        </div>
    </section>
</div>